// name转换成驼峰命名
var name = 'has own property'; // --> hasOwnProperty


var arr = name.split(' ')
var result = arr[0]

for (var i = 1; i < arr.length; i++) {
    var s = arr[i]
    arr[i] = s[0].toLocaleUpperCase() + arr[i].substring(1)  //
    result += arr[i]
}

console.log(result);



